package com.ruoyi.data.service.impl;

import com.ruoyi.data.domain.TdataRtRs;
import com.ruoyi.data.domain.TdataRtRsDay;
import com.ruoyi.data.domain.TdataRtRsHour;
import com.ruoyi.data.mapper.TdataRtRsMapper;
import com.ruoyi.data.service.ITdataRtRsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Service
public class TdataRtRsServiceImpl implements ITdataRtRsService {

    @Autowired
    private TdataRtRsMapper tdataRtRsMapper;

    @Override
    public List<TdataRtRs> selectRtRsList(TdataRtRs record) {
        return tdataRtRsMapper.selectRtRsList(record);
    }

    @Override
    public void insertList(List<TdataRtRs> records) {
        tdataRtRsMapper.insertList(records);
    }

    @Override
    public void updateByRoomIdSelective(TdataRtRs record) {
        tdataRtRsMapper.updateByRoomIdSelective(record);
    }

    @Override
    public BigDecimal selectTodayTotalRs() {
        return tdataRtRsMapper.selectTodayTotalRs();
    }

    @Override
    public BigDecimal selectYesterdayTotalRs() {
        return tdataRtRsMapper.selectYesterdayTotalRs();
    }

    @Override
    public BigDecimal selectYesterdayRs() {
        return tdataRtRsMapper.selectYesterdayRs();
    }

    @Override
    public BigDecimal selectMonthEq() {
        return tdataRtRsMapper.selectMonthEq();
    }

    @Override
    public BigDecimal selectLastMonthEq() {
        return tdataRtRsMapper.selectLastMonthEq();
    }

    @Override
    public void refresh(List<TdataRtRs> records) {
        if (!records.isEmpty()) {
            tdataRtRsMapper.refresh(records);
        }
    }

    @Override
    public List<TdataRtRs> selectRtRsDay(LocalDate date) {
        return tdataRtRsMapper.selectRtRsDay(date);
    }

    @Override
    public List<TdataRtRs> selectRtRsHour(String dateTime) {
        return tdataRtRsMapper.selectRtRsHour(dateTime);
    }

    @Override
    public void insertRtRsDay(List<TdataRtRsDay> records) {
        tdataRtRsMapper.insertRtRsDay(records);
    }

    @Override
    public void insertRtRsHour(List<TdataRtRsHour> records) {
        tdataRtRsMapper.insertRtRsHour(records);
    }

    @Override
    public void insertSelective(TdataRtRs record) {
        tdataRtRsMapper.insertSelective(record);
    }

    @Override
    public void deleteByRoomIds(List<String> roomIds) {
        tdataRtRsMapper.deleteByRoomIds(roomIds);
    }

    @Override
    public BigDecimal selectLoopEqByRoomIdDt(String roomId, LocalDate dt) {
        return tdataRtRsMapper.selectLoopEqByRoomIdDt(roomId, dt);
    }

    @Override
    public BigDecimal selectLoopEqByRoomIdDtTime(String roomId, LocalDateTime dt) {
        return tdataRtRsMapper.selectLoopEqByRoomIdDtTime(roomId, dt);
    }
}
